package cn.lzy.autowire;

import cn.lzy.autowire.entity.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description
 * @Author Administrator
 * @Date 2023/11/22 22:50
 * @Version
 **/
public class TestDemo01 {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        User user = ctx.getBean("user", User.class);
        System.err.println(user);
        User user2 = ctx.getBean("user2", User.class);
        System.err.println(user2);
        User user3 = ctx.getBean("user3", User.class);
        System.err.println(user3);
        User user4 = ctx.getBean("user4", User.class);
        System.err.println(user4);

    }
}
